﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FinalProject.Services
{
    public static class Helper
    {
        public static string HashPassword(string password)
        {
            int workfactor = 12;
            return BCrypt.Net.BCrypt.HashPassword(password, workfactor);
        }

        public static bool IsPasswordCorrect(string plaintextpassword, string hashedpassword)
        {
            return BCrypt.Net.BCrypt.Verify(plaintextpassword, hashedpassword);
        }
    }
}
